$(function () {	
	$("#googlemap").height($(window).height()-62);
	
	$("#doLocation").click(function(){
		codeAddress();
	});
	
	$("#doDirection").click(function(){
		calcRoute();
	});
	
	$("nav.main ul li").click(function(){
		if($(this).children("ul:visible").length != 0){
			$(this).children("ul").hide();
		}
		else {
			$("nav.main ul li").children("ul").hide();
			$(this).children("ul").show();
		}	
	});
	
	$("#googlemap").click(function(){
		$("nav.main ul li").children("ul").hide();
		/*if($("nav.main ul li:hover").length == 0)
		{
			$("nav.main ul li").children("ul").hide();
		}*/
	});
	
	
	var requestURL = 'https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Nguyen&sensor=false&key=AIzaSyBm5xxUGXuBToAMqmBthwT8LoME3EaOf9s&library';
	$.ajax(requestURL, { type: "GET" }).done(function (data) {
       alert("sfsaf");
    });
	
});